using System;
using System.Web; 
using System.Text; 
using System.Collections;
using System.Collections.Specialized;
using Castle.MonoRail.Framework;
using Castle.MonoRail.Framework.Internal;

using eduSrc.Models;
using eduSrc.Services;

namespace eduSrc.Web.viewComponents
{
    public class Navigator : ViewComponent
    {
        private string _rootSite = "http://www.kaoyee.com/";
        private string _channelName = string.Empty;
        private object _rootCategoryList = null;
        private string _otherNavigator = string.Empty;
        private string _advString = string.Empty;

        public override void Initialize()
        {
            _rootSite = (String)ComponentParams["RootSite"];
            _channelName = (String)ComponentParams["ChannelName"];
            _rootCategoryList = ComponentParams["RootCategoryList"];
            _otherNavigator = (String)ComponentParams["OtherNavigator"];
            _advString = (String)ComponentParams["AdvString"];

            base.Initialize();
        }

        public override void Render()
        {
            PropertyBag["RootSite"] = _rootSite;
            PropertyBag["ChannelName"] = _channelName;
            PropertyBag["RootCategoryList"] = _rootCategoryList;
            PropertyBag["OtherNavigator"] = _otherNavigator;
            PropertyBag["AdvString"] = _advString;

            base.Render();
        }
    }
}
